package com.netease.nie.dto;

import java.util.HashMap;
import java.util.Map;

import com.netease.nie.base.utils.JsonUtils;

/**
 * 登录登出Dto
 * @author Derek Xu
 * @CreateDate Aug 12, 2016
 */
public class LoginLogoutDto extends LogDto {
	private String ip;

	public String getIp() {
		return ip;
	}

	public void setIp(String ip) {
		this.ip = ip;
	}
	
	@Override
	public String toString() {
		Map<String, Object> jsonMap = new HashMap<>();
		
		jsonMap.put("account_id", accountId == null ? "" : accountId);
		jsonMap.put("user_id", userId == null ? "" : userId);
		jsonMap.put("account_vip", accountVip == null ? 0 : accountVip);
		jsonMap.put("left_point", leftPoint == null ? 0 : leftPoint);
		jsonMap.put("expire_point", expirePoint == null ? 0 : expirePoint);
		jsonMap.put("ip", ip == null ? "" : ip);
		
		return JsonUtils.obj2String(jsonMap);
	}
}
